package com.studio701.carguard.controller;



import com.studio701.carguard.pojo.ReportHuman;
import com.studio701.carguard.service.IReportHumanService;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xjc
 * @since 2022-03-27
 */
@RestController
@RequestMapping("/report-human")
public class ReportHumanController {

    @Autowired
    IReportHumanService iReportHumanService;


    @ApiOperation("添加报表人体信息")
    @PostMapping("/")
    public boolean insertReportHuman(@RequestBody ReportHuman reportHuman){
        return iReportHumanService.save(reportHuman);
    }

    @ApiOperation("获取报表人体信息")
    @GetMapping("/")
    ReportHuman getById(Integer id){
        return iReportHumanService.getById(id);
    }
}
